from models.userModel import *


@db_session
def checkPassword(Email, passWord):
    user = getUserByEmail(Email)
    if user is not None and user.passWord == passWord:
        return user
    else:
        return False
